<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">
  <link rel="alternate" href="/blog/atom.xml" title="大猪" type="application/atom+xml">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="/blog/lib/font-awesome/css/font-awesome.min.css">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    version: '7.5.0',
    exturl: false,
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    path: '',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>

  <meta name="description" content="Flutter的学习，建议优先下载Xcode、Android Studio、Visual Studio Code这几个IDE，毕竟开发的时候我们需要用到这几个IDE的其中一个。">
<meta property="og:type" content="article">
<meta property="og:title" content="大猪">
<meta property="og:url" content="https://rogueandy.gitee.io/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/index.html">
<meta property="og:site_name" content="大猪">
<meta property="og:description" content="Flutter的学习，建议优先下载Xcode、Android Studio、Visual Studio Code这几个IDE，毕竟开发的时候我们需要用到这几个IDE的其中一个。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://rogueandy.gitee.io/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/flutter1_success.jpg">
<meta property="article:published_time" content="2019-11-01T07:45:51.000Z">
<meta property="article:modified_time" content="2019-11-14T08:40:28.459Z">
<meta property="article:author" content="大钟">
<meta property="article:tag" content="Flutter学习">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://rogueandy.gitee.io/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/flutter1_success.jpg">

<link rel="canonical" href="https://rogueandy.gitee.io/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title> | 大猪</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">大猪</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
        <p class="site-subtitle">Dazhong</p>
  </div>

  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/blog/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签<span class="badge">4</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档<span class="badge">10</span></a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/blog/about/" rel="section"><i class="fa fa-fw fa-user"></i>关于</a>

  </li>
  </ul>

</nav>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

  <a href="https://github.com/RogueAndy" class="github-corner" title="点击有彩蛋~" aria-label="点击有彩蛋~" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content">
            

  <div class="posts-expand">
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block " lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://rogueandy.gitee.io/blog/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/images/userimg.jpeg#/images/avatar.gif">
      <meta itemprop="name" content="大钟">
      <meta itemprop="description" content="Dazhong">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="大猪">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2019-11-01 15:45:51" itemprop="dateCreated datePublished" datetime="2019-11-01T15:45:51+08:00">2019-11-01</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2019-11-14 16:40:28" itemprop="dateModified" datetime="2019-11-14T16:40:28+08:00">2019-11-14</time>
              </span>

          
            <span id="/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/" class="post-meta-item leancloud_visitors" data-flag-title="" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/blog/2019/11/01/Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p><strong>Flutter的学习，建议优先下载Xcode、Android Studio、Visual Studio Code这几个IDE，毕竟开发的时候我们需要用到这几个IDE的其中一个。</strong></p><a id="more"></a>
<h2 id="1-Flutter-SDK-安装包下载"><a href="#1-Flutter-SDK-安装包下载" class="headerlink" title="1. Flutter SDK 安装包下载"></a>1. Flutter SDK 安装包下载</h2><p>   以下是两种比较友好的Flutter SDK安装包的下载方式</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://github.com/flutter/flutter/releases">github下载安装包传送门</a> 直接下载即可</li>
<li><a target="_blank" rel="noopener" href="https://flutter.dev/docs/development/tools/sdk/releases?tab=macos#macos">Flutter官网安装包传送门</a> 这里我传送的事macos版本的安装包，如果是其他的安装包，可以修改链接找一下</li>
</ul>
<h2 id="2-解压"><a href="#2-解压" class="headerlink" title="2. 解压"></a>2. 解压</h2><p>   找到刚才下载好的安装包，比如我这里的安装包是 <strong>flutter-1.6.5.tar</strong> 这个版本，直接解压到指定的文件夹里去，这里我给出我存放 FlutterSDK 解压后的路径：** /Users/rogue/Documents/FlutterSDK/**。<br>   上面这个路径，就是最后我解压SDK后的路径，当然，如果你没有工具也可以使用命令行来解压，我给出如下的命令行：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">roguedeMacBook-Pro:~ rogue$ cd &#x2F;Users&#x2F;rogue&#x2F;Documents&#x2F;FlutterSDK </span><br><span class="line">roguedeMacBook-Pro:FlutterSDK rogue$ unzip ~&#x2F;Downloads&#x2F;flutter-1.6.5.tar</span><br></pre></td></tr></table></figure>
<p>   这样也是可以成功解压到 <strong>FlutterSDK</strong> 目录下。</p>
<h2 id="3-配置环境变量"><a href="#3-配置环境变量" class="headerlink" title="3. 配置环境变量"></a>3. 配置环境变量</h2><p>   在这里，我们会给出配置flutter环境变量的方法，首先，查找一下自己的电脑是否存在 <strong>.bash_profile</strong> 这个文件，有以下路径 <strong>~/.bash_profile</strong>，如果要打开文件，大家可以用以下方法：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">roguedeMacBook-Pro:~ rogue$ open -e ~&#x2F;.bash_profile</span><br></pre></td></tr></table></figure>

<p>   如果你的电脑没有该文件，那么可以自己创建一个</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">roguedeMacBook-Pro:~ rogue$ touch ~&#x2F;.bash_profile</span><br></pre></td></tr></table></figure>

<p>   <font color="#FF0000" size="4">注意：</font>如果你已经下载了Android Studio这个IDE的话，那么请你配置以下的代码至到**.bash_profile**文件里：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">export ANDROID_HOME&#x3D;&#x2F;Users&#x2F;rogue&#x2F;Library&#x2F;Android&#x2F;sdk</span><br><span class="line">export PATH&#x3D;$PATH:$ANDROID_HOME&#x2F;platform-tools </span><br><span class="line">export PATH&#x3D;$PATH:$ANDROID_HOME&#x2F;tools</span><br><span class="line">export PATH&#x3D;$PATH:$ANDROID_HOME&#x2F;build-tools&#x2F;28.0.3 </span><br></pre></td></tr></table></figure>
<p>   以上的配置，需要你找到Android SDK所在位置，不然会报错。</p>
<p>   接下来，我们会正式接入 <strong>Flutter SDK</strong> 的环境变量：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">#flutter镜像环境设置,否则无法正常下载依赖包</span><br><span class="line">export PUB_HOSTED_URL&#x3D;https:&#x2F;&#x2F;pub.flutter-io.cn</span><br><span class="line">export FLUTTER_STORAGE_BASE_URL&#x3D;https:&#x2F;&#x2F;storage.flutter-io.cn</span><br><span class="line"></span><br><span class="line">#flutter环境变量</span><br><span class="line">export PATH&#x3D;&#x2F;Users&#x2F;rogue&#x2F;Documents&#x2F;FlutterSDK&#x2F;flutter&#x2F;bin:$PATH</span><br></pre></td></tr></table></figure>
<p>   以上的配置，<font color="#FF0000" size="4">特别是 Flutter 的顺序，一定不要搞反了</font>，否则会影响后期项目的创建。</p>
<h2 id="4-检查配置"><a href="#4-检查配置" class="headerlink" title="4. 检查配置"></a>4. 检查配置</h2><p>   配置好了Flutter之后，我们需要来验证Flutter是否配置成功，中间可能大家会遇到很多小插曲，可以网上查找一下都可以解决的。<br>   在这里，需要用到一下的命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">roguedeMacBook-Pro:~ rogue$ flutter doctor</span><br></pre></td></tr></table></figure>
<p>   同时，我把我这里的检查输出打印出来给大家看，可以对照，我电脑安装了VS Code、Xcode、AS以及IntelliJ，一下的输入，虽然有报错，但是不会对运行程序有影响 ：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">roguedeMacBook-Pro:~ rogue$ flutter doctor</span><br><span class="line">Doctor summary (to see all details, run flutter doctor -v):</span><br><span class="line">[✓] Flutter (Channel dev, v1.6.5, on Mac OS X 10.14.5 18F132, locale zh-Hans-CN)</span><br><span class="line"> </span><br><span class="line">[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)</span><br><span class="line">[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)</span><br><span class="line">[✓] iOS tools - develop for iOS devices</span><br><span class="line">[✓] Android Studio (version 3.4)</span><br><span class="line">[!] IntelliJ IDEA Ultimate Edition (version 2018.2.6)</span><br><span class="line">    ✗ Flutter plugin not installed; this adds Flutter specific functionality.</span><br><span class="line">    ✗ Dart plugin not installed; this adds Dart specific functionality.</span><br><span class="line">[✓] VS Code (version 1.34.0)</span><br><span class="line">[✓] Connected device (1 available)</span><br><span class="line"></span><br><span class="line">! Doctor found issues in 1 category.</span><br><span class="line">roguedeMacBook-Pro:~ rogue$ </span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>   如果大家在执行 <strong>flutter doctor</strong> 命令的时候，遇到报错的情况，而那个错误正好是你需要使用的IDE的情况，那么你可以跟着提示去查找错误并且解决掉。</p>
<h2 id="5-创建Demo"><a href="#5-创建Demo" class="headerlink" title="5. 创建Demo"></a>5. 创建Demo</h2><p>   首先，我会使用mac 终端来创建一个程序</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">#指定文件夹目录</span><br><span class="line">croguedeMacBook-Pro:~ rogue$ cd ~&#x2F;Desktop&#x2F;hello_dz&#x2F;</span><br><span class="line">#创建项目</span><br><span class="line">roguedeMacBook-Pro:hello_dz rogue$ flutter create hello_dz</span><br></pre></td></tr></table></figure>
<p>   刚才和大家说到，**.bash_profile** 配置文件里，<strong>Flutter</strong> 的环境变量不能够写反，如果写反了，这里执行 <strong>flutter create xxx</strong> 的时候，就会一直卡在终端运行里面而迟迟不能够下载依赖包。而这里，我就不打印失败的输出，直接打印成功创建项目的输出：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br></pre></td><td class="code"><pre><span class="line">croguedeMacBook-Pro:~ rogue$ cd ~&#x2F;Desktop&#x2F;hello_dz&#x2F;</span><br><span class="line">roguedeMacBook-Pro:hello_dz rogue$ flutter create hello_dz</span><br><span class="line">Creating project hello_dz...</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner.xcworkspace&#x2F;contents.xcworkspacedata (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Info.plist (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;LaunchImage.imageset&#x2F;LaunchImage@2x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;LaunchImage.imageset&#x2F;LaunchImage@3x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;LaunchImage.imageset&#x2F;README.md (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;LaunchImage.imageset&#x2F;Contents.json</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;LaunchImage.imageset&#x2F;LaunchImage.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-76x76@2x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-29x29@1x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-40x40@1x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-20x20@1x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-1024x1024@1x.p</span><br><span class="line">  ng (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-83.5x83.5@2x.p</span><br><span class="line">  ng (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-20x20@3x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Contents.json (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-20x20@2x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-29x29@3x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-40x40@2x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-60x60@3x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-60x60@2x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-76x76@1x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-40x40@3x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Assets.xcassets&#x2F;AppIcon.appiconset&#x2F;Icon-App-29x29@2x.png</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Base.lproj&#x2F;LaunchScreen.storyboard (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;Base.lproj&#x2F;Main.storyboard (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner.xcodeproj&#x2F;project.xcworkspace&#x2F;contents.xcworkspacedata</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner.xcodeproj&#x2F;xcshareddata&#x2F;xcschemes&#x2F;Runner.xcscheme (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Flutter&#x2F;Debug.xcconfig (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Flutter&#x2F;Release.xcconfig (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Flutter&#x2F;AppFrameworkInfo.plist (created)</span><br><span class="line">  hello_dz&#x2F;test&#x2F;widget_test.dart (created)</span><br><span class="line">  hello_dz&#x2F;hello_dz.iml (created)</span><br><span class="line">  hello_dz&#x2F;.gitignore (created)</span><br><span class="line">  hello_dz&#x2F;.metadata (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;AppDelegate.h (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;main.m (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner&#x2F;AppDelegate.m (created)</span><br><span class="line">  hello_dz&#x2F;ios&#x2F;Runner.xcodeproj&#x2F;project.pbxproj (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;profile&#x2F;AndroidManifest.xml (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;mipmap-mdpi&#x2F;ic_launcher.png (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;mipmap-hdpi&#x2F;ic_launcher.png (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;drawable&#x2F;launch_background.xml (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;mipmap-xxxhdpi&#x2F;ic_launcher.png (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;mipmap-xxhdpi&#x2F;ic_launcher.png (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;values&#x2F;styles.xml (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;res&#x2F;mipmap-xhdpi&#x2F;ic_launcher.png (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;AndroidManifest.xml (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;debug&#x2F;AndroidManifest.xml (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;gradle&#x2F;wrapper&#x2F;gradle-wrapper.properties (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;gradle.properties (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;settings.gradle (created)</span><br><span class="line">  hello_dz&#x2F;pubspec.yaml (created)</span><br><span class="line">  hello_dz&#x2F;README.md (created)</span><br><span class="line">  hello_dz&#x2F;lib&#x2F;main.dart (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;build.gradle (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;app&#x2F;src&#x2F;main&#x2F;java&#x2F;com&#x2F;example&#x2F;hello_dz&#x2F;MainActivity.java</span><br><span class="line">  (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;build.gradle (created)</span><br><span class="line">  hello_dz&#x2F;android&#x2F;hello_dz_android.iml (created)</span><br><span class="line">  hello_dz&#x2F;.idea&#x2F;runConfigurations&#x2F;main_dart.xml (created)</span><br><span class="line">  hello_dz&#x2F;.idea&#x2F;libraries&#x2F;Flutter_for_Android.xml (created)</span><br><span class="line">  hello_dz&#x2F;.idea&#x2F;libraries&#x2F;Dart_SDK.xml (created)</span><br><span class="line">  hello_dz&#x2F;.idea&#x2F;libraries&#x2F;KotlinJavaRuntime.xml (created)</span><br><span class="line">  hello_dz&#x2F;.idea&#x2F;modules.xml (created)</span><br><span class="line">  hello_dz&#x2F;.idea&#x2F;workspace.xml (created)</span><br><span class="line">Running &quot;flutter pub get&quot; in hello_dz...                            6.3s</span><br><span class="line">Wrote 66 files.</span><br><span class="line"></span><br><span class="line">All done!</span><br><span class="line">[✓] Flutter is fully installed. (Channel dev, v1.6.5, on Mac OS X 10.14.5</span><br><span class="line">    18F132, locale zh-Hans-CN)</span><br><span class="line">[✓] Android toolchain - develop for Android devices is fully installed. (Android</span><br><span class="line">    SDK version 28.0.3)</span><br><span class="line">[✓] Xcode - develop for iOS and macOS is fully installed. (Xcode 10.2.1)</span><br><span class="line">[✓] iOS tools - develop for iOS devices is fully installed.</span><br><span class="line">[✓] Android Studio is fully installed. (version 3.4)</span><br><span class="line">[!] IntelliJ IDEA Ultimate Edition is partially installed; more components are</span><br><span class="line">    available. (version 2018.2.6)</span><br><span class="line">[✓] VS Code is fully installed. (version 1.34.0)</span><br><span class="line">[✓] Connected device is fully installed. (1 available)</span><br><span class="line"></span><br><span class="line">Run &quot;flutter doctor&quot; for information about installing additional components.</span><br><span class="line"></span><br><span class="line">In order to run your application, type:</span><br><span class="line"></span><br><span class="line">  $ cd hello_dz</span><br><span class="line">  $ flutter run</span><br><span class="line"></span><br><span class="line">Your application code is in hello_dz&#x2F;lib&#x2F;main.dart.</span><br><span class="line"></span><br><span class="line">roguedeMacBook-Pro:hello_dz rogue$ </span><br></pre></td></tr></table></figure>

<p>   创建项目成功之后，我们可以在目录下找到名为 <strong>ios</strong> 的文件夹，打开 <strong>Runner.xcworkspace</strong> 直接运行程序即可。</p>
<p>   最后，你终端创建的项目，既可以使用Xcode打开运行，也可以使用VS Code进行打开运行，还有AS。</p>
<p><img src="Flutter%E5%AD%A6%E4%B9%A0%EF%BC%881%EF%BC%89-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/flutter1_success.jpg" alt="avatar"></p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/blog/tags/Flutter%E5%AD%A6%E4%B9%A0/" rel="tag"># Flutter学习</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
                <a href="/blog/2019/10/10/Mac%E4%B8%8BNginx-Nodejs%E9%85%8D%E7%BD%AE/" rel="next" title="">
                  <i class="fa fa-chevron-left"></i> 
                </a>
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
                <a href="/blog/2019/11/02/Mac%E9%85%8D%E7%BD%AENginx%E4%BB%A5%E5%8F%8Acss%E6%96%87%E4%BB%B6%E7%9A%84%E8%B7%AF%E5%BE%84/" rel="prev" title="">
                   <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
      </footer>
    
  </article>
  
  
  

  </div>


          </div>
          
    <div class="comments" id="comments"></div>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-Flutter-SDK-%E5%AE%89%E8%A3%85%E5%8C%85%E4%B8%8B%E8%BD%BD"><span class="nav-number">1.</span> <span class="nav-text">1. Flutter SDK 安装包下载</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E8%A7%A3%E5%8E%8B"><span class="nav-number">2.</span> <span class="nav-text">2. 解压</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E9%85%8D%E7%BD%AE%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F"><span class="nav-number">3.</span> <span class="nav-text">3. 配置环境变量</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E6%A3%80%E6%9F%A5%E9%85%8D%E7%BD%AE"><span class="nav-number">4.</span> <span class="nav-text">4. 检查配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-%E5%88%9B%E5%BB%BADemo"><span class="nav-number">5.</span> <span class="nav-text">5. 创建Demo</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="大钟"
      src="/blog/images/userimg.jpeg#/images/avatar.gif">
  <p class="site-author-name" itemprop="name">大钟</p>
  <div class="site-description" itemprop="description">Dazhong</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">10</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/blog/tags/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="feed-link motion-element">
    <a href="/blog/atom.xml" rel="alternate">
      <i class="fa fa-rss"></i>RSS
    </a>
  </div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/rogueandy" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;rogueandy" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://gitee.com/rogueandy" title="Gitee → https:&#x2F;&#x2F;gitee.com&#x2F;rogueandy" rel="noopener" target="_blank"><i class="fa fa-fw fa-gitee"></i>Gitee</a>
      </span>
  </div>



      </div>s

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">大钟</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v5.4.0
  </div>
  <span class="post-meta-divider">|</span>
  <div class="theme-info">主题 – <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> v7.5.0
  </div>

        












        
      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/pisces.js"></script>


<script src="/blog/js/next-boot.js"></script>




  
















  

  


<script>
NexT.utils.getScript('/js/src/Valine.min.js', () => {
  var GUEST = ['nick', 'mail', 'link'];
  var guest = 'nick,mail,link';
  guest = guest.split(',').filter(item => {
    return GUEST.includes(item);
  });
  new Valine({
    el: '#comments',
    verify: false,
    notify: false,
    appId: '4392Rm9FOc08gpKx04B1WkRH-gzGzoHsz',
    appKey: 'dNlRkwkrCHoG59nvxMyFN5CN',
    placeholder: "发表~~",
    avatar: 'mm',
    meta: guest,
    pageSize: '10' || 10,
    visitor: true,
    lang: '' || 'zh-cn',
    path: location.pathname,
    recordIP: false,
    serverURLs: ''
  });
}, window.Valine);
</script>

</body>
</html>
